package top.malaoshi.netdisk.filter;

import org.springframework.web.filter.CorsFilter;

import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 处理跨域的过滤器
 */
@WebFilter("/*")
public class F0CorsFilter extends CorsFilter {

    @Override
    protected void configCors(HttpServletRequest request, HttpServletResponse response) {
        setCorsHeader(request,response,
                "*","*","*",true,120);
    }
}
